package marlon.sjf;

/**
 * @author marlonyao<yaolei135@gmail.com>
 *
 */
public enum SJFErrorCode {
	COMMAND_ERROR(200, "Command error"),
	COMMAND_NOT_FOUND(201, "Command not found"),
	COMMAND_ARGS_REQUIRED(202, "Command args required"),
	CHUNK_ERROR(300, "Unexpected chunk type"),
	CHUNK_EXPECT_COMMNAD(301, "Expect chunk command"),
	CHUNK_EXPECT_STDIN(302, "Expect chunk stdin"),
	IO_ERROR(400, "IO/Network error"),
	;
	
	private int code;
	private String desc;
	
	SJFErrorCode(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public int getCode() {
		return code;
	}
	
	public String getDescription() {
		return desc;
	}
}
